<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0px;
            padding: 0px;
        }
        html,body{
            width: 100%;
            height: 100%;
        }
        .box1{
            width: 100%;
            height: 100%;
            background-color: bisque;
            display: -webkit-flex;
            justify-content: center;
            align-items: center;
        }
        .box2{
            width: 50%;
            background-color: #cccccc;
            text-align: center;
          /*  position: relative; !*脱离文档流*!
            top: 50%; !*偏移*!
            left: 50%;
            transform: translateY(-50%) translateX(-50%);*/
        }
    </style>
</head>
<body>
<div class="box1">
    <div class="box2">
        <h1>Middle</h1>
        <h1>Middle</h1>
        <h1>Middle</h1>
    </div>
</div>
</body>
</html>